<?php
	header("Content-Type: text/html;charset=utf-8"); 

	include("../function/_nosql.php");

	include("../function/function.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <title>社区</title>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="css/index.css"/>
    <link rel="stylesheet" type="text/css" href="css/shequ.css"/>
    <script type="text/javascript" src="../js/baidutongji.js"></script>
</head>
<body>
	<div id="wrap">
		<header>
				<div class="header">
					<div class="h-logo"><img src="./image/logo.png"></div>
					<div class="h-panel">
						<img src="image/top_pic1.png">
						<img src="image/top_pic2.png">
					</div>
				</div>
				<nav>
					<a href="index.php">首页</a>
					<a href="huodong.php">活动</a>
					<a href="shequ.php">资讯</a>
					<a href="">社区</a>
					<a href="">步道</a>
				</nav>
			</header>
		<main>
			<div class="sq-d-r">
            <div class="sq-d-item">
            	<div class="title"><h3><a href="">全部</a></h3></div>
                <div class="sq-r-box">
                	<?php 
                				$pagesize = 10; // 分页数量
								
								$pageval = chkstr(trim($_REQUEST['page'])); // 获取Page的值

								if($pageval){

									if(!is_numeric($pageval)){

										echo erro("Page Error");

									}

									if($pageval <= 1){

										$pageval = 1;

									}

									$page = ($pageval-1) * $pagesize;

									$page .= ",";

								}else{

									$pageval = 1;

								}
								$pagesql = "select * from kboy_forum_travel order by id desc";
								$pagenum = mysql_num_rows(mysql_query($pagesql)); // 总记录数
								$pagecount = ceil($pagenum/$pagesize); // 共分多少页

								if($pageval > $pagecount){

									$pageval = $pagecount;

								}

								
                		$pagesql = "$pagesql limit $page $pagesize";
                		
                		$news_rows = mysql_query($pagesql);
								
						while($news_rs = mysql_fetch_array($news_rows)){
                		
                	 ?>
				    <dl>
                        <dt><a href="shequ-t.php?newsid=<?php echo $news_rs['id']; ?>"><img src="<?php echo $news_rs['travel_pic'];?>" width="25%" height="73" alt=""></a></dt>
                        <dd>
                            <div class="r-t"><a href="shequ-t.php?newsid=<?php echo $news_rs['id']; ?>"><?php echo $news_rs['travel_title']; ?></a></div>
                            <div class="r-w"><p class="date"><?php echo date('Y年m月d日',strtotime($news_rs['travel_addtime'],time()));?></p><p class="date" style="color:#3366cc;">阅读(<span style="color:#d85803;"><?php echo $news_rs['travel_hit']; ?></span>)</p></div>
                        </dd>
                    </dl>
                    <?php } ?>
                </div>
                <?php
									if($pagenum > $pagesize){
	
										echo "<div class=\"pagination\"><ul>";
										
										if(isset($_GET['prov']))
										{
										$url = "shequ.php?classid=1&prov=$prov";
										}else{
											
										$url = "shequ.php?classid=1";//当前页面
										}
	
										pagebar($pagecount, $pageval, 2, $url);
	
										echo "</ul></div>";
	
									}
	
							?>
            </div>
        </div>
		</main>
	</div>
	<footer>
        <nav class="navbar navbar-default navbar-fixed-bottom">
            <div class="col-xs-12 btn-group" style="height: 50px;line-height: 50px;background-color: #EDF2F7 ;text-align: center;position: fixed ;width: 100%;bottom: 0;left: 0;">
                <a href="index.php" style="width: 25%;padding: 0 !important;font-size:16px;display: block;float: left;" class="col-xs-3 nopadding text-center bottomDiv">
                	首页
                </a> 

                <a href="huodong.php" style="width: 25%;padding: 0 !important;font-size:16px;display: block;float: left;" class="col-xs-3 nopadding text-center bottomDiv">
               	活动
                </a>

                <a href="shequ.php" style="width: 25%;padding: 0 !important;font-size:16px;display: block;float: left;" class="col-xs-3 nopadding text-center bottomDiv">
             	 社区
                </a>
                
                <a href="personal.php" style="width: 25%;padding: 0 !important;font-size:16px;display: block;float: left;" class="col-xs-3 nopadding text-center bottomDiv">
               	个人中心
                </a>
            </div>
        </nav>
    </footer>
</body>
</html>	

















